package com.aaa.controller;


import com.aaa.entity.Menu;
import com.aaa.entity.Role;
import com.aaa.service.MenuService;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("system/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("findByUserid/{userId}")
    public List<Menu> findByUserid(@PathVariable Long userId){
        return menuService.findByUserid(userId);
    }



}
